package com.kkd.springbootproject.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author 14587
 * @date 2021/1/13 15:00
 */
@Component
@ConfigurationProperties(prefix = "person")
public class Person {
    private String name;
    private int age;
    private List<Object> hobbies;
    private Map<String,Object> map;
    private Dog dog;

    public Person() {
    }

    public Person(String name, int age, List<Object> hobbies, Map<String, Object> map, Dog dog) {
        this.name = name;
        this.age = age;
        this.hobbies = hobbies;
        this.map = map;
        this.dog = dog;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public List<Object> getHobbies() {
        return hobbies;
    }

    public void setHobbies(List<Object> hobbies) {
        this.hobbies = hobbies;
    }

    public Map<String, Object> getMap() {
        return map;
    }

    public void setMap(Map<String, Object> map) {
        this.map = map;
    }

    public Dog getDog() {
        return dog;
    }

    public void setDog(Dog dog) {
        this.dog = dog;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", hobbies=" + hobbies +
                ", map=" + map +
                ", dog=" + dog +
                '}';
    }
}
